//////////////////////////////////////////////////////////////////////
//!\file Album.cpp
//!\brief Contains tracks.
//!\author timmsusa@googlemail.com
//////////////////////////////////////////////////////////////////////

#include "Album.hpp"
/*
Album::Album(const QString& name):
    m_Name(name)
{
}
*/
Album::Album():
    m_eAlbumDiffersIn(Album::NOTHING)
{
}
void Album::clearAll()
{
    if ( !m_TrackList.isEmpty())
    {
        m_TrackList.clear();
    }

    if ( !m_FlacTrackList.isEmpty() )
    {
        m_FlacTrackList.clear();
    }
}

void Album::addTrack(const QString& track)
{
    if (!track.isEmpty())
        m_TrackList.push_back(track);
}

void Album::addFlacTrack(const FlacTrack &flacTrack)
{
        m_FlacTrackList.push_back(flacTrack);
        // TODO: Decide for just one data container.
        m_FlacTrackStrList.push_back(flacTrack.getAsVec());
}

void Album::setPath(const QString& path)
{
    if ( path != m_Path)
    {
        clearAll();
        m_Path = path;
    }
}
void Album::setName(const QString& name)
{
    if ( name != m_Name)
    {
        m_Name = name;
    }
}

QString Album::getPath()const
{
    return m_Path;
}

QString Album::getName()const
{
    return m_Name;
}

const QVector< QString >& Album::getTrackList()const
{
    return m_TrackList;
}

const QVector< FlacTrack > &Album::getFlacTrackList() const
{
    return m_FlacTrackList;
}

const QVector< QVector< QString > >& Album::getFlacTrackStrList() const
{
    return m_FlacTrackStrList;
}

void Album::setAlbumDiffersIn(Album::AlbumDiffersIn d)
{
    m_eAlbumDiffersIn=d;
}

Album::AlbumDiffersIn Album::getAlbumDiffersIn() const
{
    return m_eAlbumDiffersIn;
}
